<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>顶部进度条</title>
    <style>
        .loading {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 100;
            background-color: yellow;
            width: 100%;
            height: 100%;
        }

        .load {
            width: 0%;
            height: 5px;
            position: absolute;
            top: 0;
            left: 0;
            background-color: #f33;
        }
    </style>
    <script src="jquery-1.11.3.js"></script>
</head>
<body>
<div class="loading" id="loading">
    <div class="load">
    </div>
</div>
<header>
    <img src="http://g.hiphotos.baidu.com/image/pic/item/c8ea15ce36d3d539f09733493187e950342ab095.jpg" alt="">
</header>
<script>
    $('#loading .load').animate({'width':'20%'},100)
</script>
<section class="banner">
    <img src="http://g.hiphotos.baidu.com/image/pic/item/c8ea15ce36d3d539f09733493187e950342ab095.jpg" alt="">
</section>
<section class="news">
    <img src="http://f.hiphotos.baidu.com/image/pic/item/503d269759ee3d6db032f61b48166d224e4ade6e.jpg" alt="">
</section>
<script>
    $('#loading .load').animate({'width':'40%'},100)
</script>
<section class="content">
    <img src="http://a.hiphotos.baidu.com/image/pic/item/d6ca7bcb0a46f21f46612acbfd246b600d33aed5.jpg" alt="">
</section>
<script>
    $('#loading .load').animate({'width':'80%'},100)
</script>
<footer>
    <img src="http://c.hiphotos.baidu.com/image/h%3D300/sign=6d0bf83bda00baa1a52c41bb7711b9b1/0b55b319ebc4b745b19f82c1c4fc1e178b8215d9.jpg"
         alt="">
</footer>
<script>
    $('#loading .load').animate({'width':'100%'},100,function () {
        $('#loading').fadeOut()

    })
</script>

</body>
</html>